set(COMPILE_SOURCE_FILES
	Logger
	based_variant
	exceptions
	algorithm
	digraph
	dorepeat
	foreach
	functional
	hashing
	hash_map
	hash_set
	lazy_selector
	lazy_random_selector
	lazy_normal_selector
	logging
	lru_cache
	selection
	slist
	tree
	files
	StringTokenizer
	StringManipulator
	PorterStemmer
	mt19937ar
)

add_library(${PROJECT_NAME} SHARED ${COMPILE_SOURCE_FILES})

target_link_libraries(${PROJECT_NAME} rt boost_regex)

include_directories(${CMAKE_SOURCE_DIR}/src)

set(INCLUDE_SOURCE_FILES
	logging.h
	based_variant.h
	lazy_normal_selector.h
	hash_map.h
	StringTokenizer.h
	selection.h
	RandGen.h
	PorterStemmer.h
	Logger.h
	functional.h
	hashing.h
	mt19937ar.h
	dorepeat.h
	algorithm.h
	digraph.h
	lazy_random_selector.h
	numeric.h
	lru_cache.h
	foreach_local_copy.hpp
	files.h
	hash_set.h
	lazy_selector.h
	platform.h
	slist.h
	StringManipulator.h
	exceptions.h
	foreach.h
	tree.h
	files.h
)

#install header files
INSTALL(FILES

	${INCLUDE_SOURCE_FILES}

	DESTINATION

	"include/${PROJECT_NAME}" 
)

#install library
INSTALL(TARGETS 
	${PROJECT_NAME}
	DESTINATION lib PERMISSIONS
	OWNER_READ OWNER_WRITE OWNER_EXECUTE
	GROUP_READ GROUP_EXECUTE
	WORLD_READ WORLD_EXECUTE )
